import request from '@/utils/request'
// 获取所有用户留言列表
export const getMessage = ({ page, pageSize }) => {
  return request({
    url: `/hotel/comment?page=${page}&pageSize=${pageSize}`,
    method: 'GET'
  })
}
// 获取所有管理员回复列表
export const getAdminReply = () => {
  return request({
    url: '/comment/replies',
    method: 'GET'
  })
}
// 管理员根据游客id修改回复
export const updateAdminReply = (id, content) => {
  return request({
    url: `/comment/replies/${id}/update`,
    method: 'PUT',
    data: {
      content
    }
  })
}
// 通过id获取用户留言

export const getUserMessage = (id) => {
  return request({
    url: `/hotel/comment/${id}`,
    method: 'GET'

  })
}
// 通过id删除用户留言
export const delUserMessageAPI = (id) => {
  return request({
    url: `/hotel/comment/${id}`,
    method: 'DELETE'

  })
}
